#!/usr/bin/node

const log = console.log;
const koa = require('koa');
const logger = require('./middleware/logger.js'); 

let app = new koa();

//加载使用中间件

//M-logger
app.use(logger);

//中间件M-hello
app.use((ctx,next)=>{
  //requset parse
  //make response
  ctx.body='hello koa';
});
app.listen(8080);

log('hello world');

